package com.zle.component.timer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zle.common.util.DateUtil;
import com.zle.dao.CodeMapper;
import com.zle.entity.CodeExample;
import com.zle.entity.CodeExample.Criteria;

@Component
public class CleanDeviceInfoBean {
	@Autowired
	private CodeMapper codeMapper;
	
	public void cleanDevice(){
		CodeExample example = new CodeExample();
		Criteria criteria= example.createCriteria();
		criteria.andCodeValueMeanEqualTo("百分比");
		criteria.andVar1LessThan(DateUtil.getCurrentTime().substring(0, 10));
		codeMapper.deleteByExample(example);
	}

}
